<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<body class="page-header-fixed">
<div class="form-group" style="margin: 0px;">
		<div class="row">
			<label class="col-sm-1 control-label text-right" >收款方</label>
			<div class="col-sm-3">
				<div class="input-group">
					<select ng-options="merchant.merchantCode as merchant.name for merchant in merchantMap" 
									ng-model="searchModel.merchantCode" class="form-control flexselect">
					</select> 
				 </div>
			</div>  
			<label class="col-sm-1 control-label text-right"  >会计月份</label>
			<div class="col-sm-2"> 
				<div class="input-group">
					<select ng-model="searchModel.year" class="form-control">
								<option value="">请选择年份</option>
								<option value="2016">2016</option>
								<option value="2017">2017</option>
								<option value="2018">2018</option>	
								<option value="2019">2019</option>
								<option value="2020">2020</option>
								<option value="2021">2021</option>
								<option value="2022">2022</option>
								<option value="2023">2023</option>
								<option value="2024">2024</option>
								<option value="2025">2025</option>
								<option value="2026">2026</option>
							</select>
				</div>
			</div>
			<div class="col-sm-2"> 
				<div class="input-group"> 
					<select ng-model="searchModel.month" class="form-control">
								<option value="">请选择月份</option>
								<option value="01">01</option>
								<option value="02">02</option>
								<option value="03">03</option>
								<option value="04">04</option>
								<option value="05">05</option>
								<option value="06">06</option>
								<option value="07">07</option>
								<option value="08">08</option>
								<option value="09">09</option>
								<option value="10">10</option>
								<option value="11">11</option>
								<option value="12">12</option>
							</select>
				</div>
			</div>
			<div class="col-sm-1">
				<div class="input-group">
					<button type="button" class="btn btn-primary"  ng-click="query()"  ><i class="fa "></i>查询</button>
				</div>
			</div>
			<div class="col-sm-1">
				<div class="input-group">
					<button type="button" class="btn btn-primary"  ng-click="exportExcelDebtMerchantLiabilities()"  ><i class="fa "></i>导出Excel</button>
				</div>
			</div>
	</div>
</div>
<hr />
<table class="table table-striped table-bordered table-hover"
		id="table_1">
		<thead>
			<tr>
				<th>付款方</th>
				<th>收款方</th>
				<th>科目</th>
				<th>金额(元)</th>
				<th>笔数</th>
				<th>月份</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<tr class="odd gradeX"
				ng-repeat="batchPay in listLiabilities  track by $index"
				on-loaded="{{$last}}" target-table="table_1">
				<td><span
					ng-bind="batchPay.merchantCode | getValueInArgFilter : merchantMap : 'name'"></span>
				</td>
				<td><span
					ng-bind="batchPay.merchantCode1 | getValueInArgFilter : merchantMap : 'name'" ></span>
				</td>
					<td><span
					ng-bind="batchPay.subSubjectCode| getValueInArgFilter : subjectMap : 'subjectName'" ></span>
				</td>
				<td ><my-span  amount="batchPay.amount" /></td>
				<!-- <td><span ng-bind="batchPay.amount | currency:'￥'"></span></td> -->
				<td><span ng-bind="batchPay.totalCount"></span></td>
				<td><span ng-bind="batchPay.accountingMonth"></span></td>
				<td><span ng-class=" {'bg_red': batchPay.state==2, 'back_green': batchPay.state==1}"
					ng-bind="batchPay.state|getValueInStaticFilter : 'payStateArray'"></span>
				</td> 
				<td><span ng-show="batchPay.state==2">
					<input type="button"   class="btn"  data-target="#payChannelModel" 	  ng-click="pay(batchPay)"	data-toggle="modal"    value="结算"/>
				</span></td>
			</tr>
		</tbody>
	</table>
	
	<div id="payChannelModel" class="modal fade" role="dialog" aria-hidden="true"
		data-backdrop="false">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">×</button>
					<h4 class="modal-title">支付渠道选择</h4>
				</div>
				<div class="modal-body form">
					<div class="form-group">
					<div class="row">
							<label class="col-sm-3 control-label text-right">选择服务</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control  bValidate"  key="required"
										ng-options="orderService.serviceNo as orderService.name for orderService in settlmentServiceList "
										ng-model="payModel.serviceNo">
										<option value="">请选择结算服务</option>
									</select>
								</div>
							</div>
						</div>
							<div class="row">
							<label class="col-sm-3 control-label text-right">选择支付类型</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control  bValidate"  key="required"
										ng-model="payModel.payTypeCode">
										<option value="">选择支付类型</option>
										<option value="1">第三方实时支付</option>
										<option value="7">现金支付</option>
									</select>
								</div>
							</div>
						</div>
						<div class="row">
							<label class="col-sm-3 control-label text-right">支付渠道</label>
							<div class="col-sm-8">
								<div class="input-group">
									<select class="form-control  bValidate"  key="required"
										ng-model="payModel.channelCode ">
										<option value=""  >请选择支付渠道</option>
										<option ng-repeat="channel in payChannelList " ng-value="channel.channelCode"   ng-if="channel.channelCode!='EWALLET' " >{{channel.channelName}}</option>
									</select>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-danger" data-dismiss="modal">
						<i class="fa fa-times"></i>关闭
					</button>
					<button type="button" class="btn btn-primary"
						ng-click="payLiabilities();">
						<i class="fa fa-check"></i>保存
					</button>
				</div>
			</div>
		</div>
	</div>
	
</body>
<script src="manageView/assets/scripts/public.js" type="text/javascript"></script>
</html>  